#ifndef CONTACTLIST_H
#define CONTACTLIST_H


#include "contactinfo.h"

#include <QListWidget>
#include <QMenu>
#include <QMouseEvent>
#include <QLineEdit>
#include <QHostAddress>
class ContactList : public QListWidget
{
    Q_OBJECT
public:
    explicit ContactList(QListWidget *parent = 0);
    QMenu *blankMenu;
    QMenu *personMenu;
    void mousePressEvent(QMouseEvent *event);
    void contextMenuEvent(QContextMenuEvent*);
    void initMenu();
    QListWidgetItem *currentItem=nullptr;
signals:
    void contactItemClick(ContactInfo *contactInfo);
public slots:
    void slotAddContact(ContactInfo *contactInfo,bool isMe);
    void slotDelContact();
    int slotIsIncludeList(ContactInfo *contactInfo);
};



#endif // CONTACTLIST_H
